package com.zust.java.bean;

import java.util.Date;

import org.springframework.stereotype.Repository;

@Repository
public class OrderView implements Comparable<OrderView> {

    private int orderNo;
    private Date creatTime;
    private Date deadline;
    private String username;
    private int accountId;

    public int getAccountId() {
        return accountId;
    }

    public void setAccountId(int accountId) {
        this.accountId = accountId;
    }

    public int getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(int orderNo) {
        this.orderNo = orderNo;
    }

    public Date getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(Date creatTime) {
        this.creatTime = creatTime;
    }

    public Date getDeadline() {
        return deadline;
    }

    public void setDeadline(Date deadline) {
        this.deadline = deadline;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public OrderView() {
        super();
    }

    @Override
    public String toString() {
        return "OrderView [orderNo=" + orderNo + ", creatTime=" + creatTime + ", deadline=" + deadline + ", username="
                + username + ", accountId=" + accountId + "]";
    }

    public int compareTo(OrderView o) {
        return creatTime.compareTo(o.getCreatTime());
    }

}
